package com.first.homeqian.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.first.common.pojo.CrmBanner;
import com.first.common.vo.Result;
import com.first.homeqian.mapper.BannerMapper;
import com.first.homeqian.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: first-project
 * @description:
 * @author: 闫锦超
 * @create: 2023-06-01 19:46
 **/
@Service
public class BannerServiceImpl implements BannerService {
    @Autowired
    private BannerMapper bannerMapper;
    @Override
    public Result getQianBanner() {
        QueryWrapper<CrmBanner> wrapper = new QueryWrapper<>();
        wrapper.eq("is_disable",0);
        List<CrmBanner> crmBanners = bannerMapper.selectList(wrapper);
        return Result.success(crmBanners);
    }
}
